package com.salesmanager.core.business.customer.service;


import com.salesmanager.core.business.customer.model.*;
import com.salesmanager.core.business.generic.exception.ServiceException;
import com.salesmanager.core.business.generic.service.SalesManagerEntityService;
import com.salesmanager.core.business.statistics.model.*;
import com.salesmanager.web.model.paging.PaginationDataList;

import java.math.BigDecimal;
import java.text.ParseException;
import java.util.List;

public interface CustomerService  extends SalesManagerEntityService<Long, Customer> {

	Customer getByTelphone(String telphone);

	void saveOrUpdate(Customer customer) throws ServiceException;

	boolean saveSignUpUser(CustomerCriteria customerCriteria) throws ServiceException;


	boolean validateCustomer(String username, String password);

    CustomerAuths getCustomerAuthByDeviceId(String deviceId);

	boolean saveDeviceToke(String username, String deviceToke,String appKey);

	boolean updatePassword(String username, String newpassword) throws ServiceException;

	PaginationDataList<StatisticsEntityForCustomer> listWithCustomer(CustomerStatisticsCriteria criteria) throws ServiceException;

	Customer getCustomer(Long id);

    /**
     *
     * @param startTime
     * @param endTime
     * @return
     */
	int getCustomerCount(String startTime,String endTime) throws ParseException;

}
